package com.tcd.explore.mapper;

import com.tcd.explore.pojo.SurveyLossInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 * 查勘定损信息表 Mapper 接口
 * </p>
 *
 * @author Jarle
 * @since 2021-05-25
 */
public interface SurveyLossInfoMapper extends BaseMapper<SurveyLossInfo> {
    @Update("update survey_loss_info set survey_status=#{status} where survey_loss_id=#{sid}")
    public boolean SurveyStatusEditstatus(String sid, String status);

    @Insert("insert into survey_loss_info values(#{sur})")
    public boolean Surveyadd(SurveyLossInfo surveyLossInfo);

    @Select("select count(*) from survey_loss_info where claim_main_id=#{claimmainid} and survey_status=3")
    public int Suryveycount(String claimmainid);

    public List<SurveyLossInfo> Surveysplice(@Param("page") int page, @Param("pagesize") int pagesize);

    @Select("select * from survey_loss_info where claim_main_id=#{claimMainid}")
    public SurveyLossInfo listsurvery(String claimMainid);
}
